﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Liger.Web.UI
{
    public abstract class JObjectBuilderBase
    {
        protected JObjectBase Obj;

        public JObjectBuilderBase(JObjectBase obj)
        {
            this.Obj = obj;
        }

        /// <summary>
        /// 设置属性
        /// </summary>
        /// <param name="property"></param>
        /// <param name="value"></param>
        /// <returns></returns>
        public JObjectBuilderBase Set(string property, object value)
        {
            if (this.Obj != null)
            {
                if (this.Obj.Properties == null)
                {
                    this.Obj.Properties = new Dictionary<string, object>();
                }
                this.Obj.Properties.Add(property, value);
            }
            return this;
        }
    }
}
